package net.wicp.tams.commons.callback.impl.column;

import java.math.BigDecimal;

import org.apache.tapestry5.json.JSONObject;

import net.wicp.tams.commons.callback.ICol;

public class ColBigDecimal implements ICol<BigDecimal> {
	private static final long serialVersionUID = 1L;
	private final BigDecimal obj;

	public ColBigDecimal(BigDecimal obj) {
		this.obj = obj;
	}

	@Override
	public String toClient() {
		return String.valueOf(obj);
	}

	@Override
	public BigDecimal toValue() {
		return obj;
	}

	@Override
	public JSONObject toJson(String colName) {
		return new JSONObject(colName, obj);
	}

}
